import 'package:flutter/material.dart';
import 'package:hello_world/bus.dart';

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    bus.emit("view_context", context);
    return Scaffold(
      appBar: AppBar(
        title: Text('Home'),
      ),
      body:  new ListView(
        children: [
          Center(
            child: RaisedButton(
              child: Text('goto login'),
              onPressed: () {
                bus.emit("login");
              },
            ),
          )
        ]
      ),
    );
  }
}
